using System.ComponentModel.DataAnnotations;
using WalkingTec.Mvvm.Core;
using WalkingTec.Mvvm.Core.Extensions;
using HengTong.Model.Db.Hr.Bill;
using HengTong.Model.Db.Hr;
using TiaoTaoHelper.Wtm.Models;


namespace HengTong.ViewModel.Hr.SysHrJobAssignmentRequestBillEntryVms
{
    public partial class SysHrJobAssignmentRequestBillEntryTemplateVm : BaseTemplateVM
    {
        [Display(Name = "员工")]
        public ExcelPropety PersonExcel = ExcelPropety.CreateProperty<SysHrJobAssignmentRequestBillEntry>(x => x.PersonId);
        [Display(Name = "员工工号")]
        public ExcelPropety StaffNoExcel = ExcelPropety.CreateProperty<SysHrJobAssignmentRequestBillEntry>(x => x.StaffNo);
        [Display(Name = "员工姓名")]
        public ExcelPropety NameExcel = ExcelPropety.CreateProperty<SysHrJobAssignmentRequestBillEntry>(x => x.Name);
        [Display(Name = "工作岗位")]
        public ExcelPropety JobPositionExcel = ExcelPropety.CreateProperty<SysHrJobAssignmentRequestBillEntry>(x => x.JobPositionId);
        [Display(Name = "所属部门")]
        public ExcelPropety GroupExcel = ExcelPropety.CreateProperty<SysHrJobAssignmentRequestBillEntry>(x => x.GroupId);
        [Display(Name = "人事组织")]
        public ExcelPropety OrgExcel = ExcelPropety.CreateProperty<SysHrJobAssignmentRequestBillEntry>(x => x.OrgId);
        [Display(Name = "备注")]
        public ExcelPropety EntryRemarkExcel = ExcelPropety.CreateProperty<SysHrJobAssignmentRequestBillEntry>(x => x.EntryRemark);
        [Display(Name = "主表")]
        public ExcelPropety JobAssignmentExcel = ExcelPropety.CreateProperty<SysHrJobAssignmentRequestBillEntry>(x => x.JobAssignmentId);

	    protected override void InitVM()
        {
            PersonExcel.DataType = ColumnDataType.ComboBox;
            PersonExcel.ListItems = DC.Set<SysPerson>().GetSelectListItems(Wtm, y => y.Name);
            JobPositionExcel.DataType = ColumnDataType.ComboBox;
            JobPositionExcel.ListItems = DC.Set<SysJobPosition>().GetSelectListItems(Wtm, y => y.Name);
            GroupExcel.DataType = ColumnDataType.ComboBox;
            GroupExcel.ListItems = DC.Set<SysGroup>().GetSelectListItems(Wtm, y => y.GroupName);
            OrgExcel.DataType = ColumnDataType.ComboBox;
            OrgExcel.ListItems = DC.Set<SysOrg>().GetSelectListItems(Wtm, y => y.Name);
            JobAssignmentExcel.DataType = ColumnDataType.ComboBox;
            JobAssignmentExcel.ListItems = DC.Set<SysHrJobAssignmentRequestBill>().GetSelectListItems(Wtm, y => y.BillCode);
        }

    }

    public class SysHrJobAssignmentRequestBillEntryImportVm : BaseImportVM<SysHrJobAssignmentRequestBillEntryTemplateVm, SysHrJobAssignmentRequestBillEntry>
    {

    }

}
